
import request from "@/utils/request";
const BEAS_URL = '/api/admin/participants' 
class API {
  /*     获取列表     */
  static getList (params) {
    return request({
      url: `${BEAS_URL}`,
      method: "GET",
      params: params
    });
  }
  /*     获取    */
  static get (id) {
    return request({
      url: `${BEAS_URL}/${id}`,
      method: "GET",
    });
  }
  /*     添加     */
  static add (data) {
    return request({
      url: `${BEAS_URL}`,
      method: "POST",
      data: data
    });
  }
  /*     修改    */
  static put (data) {
    return request({
      url: `${BEAS_URL}/${data.id}`,
      method: "PUT",
      data: data
    });
  }

  /*     批量修改    */
  static putMore (data) {
    return request({
      url: `${BEAS_URL}`,
      method: "PUT",
      data: data
    });
  }

  /*     删除     */
  static del (data) {
    return request({
      url: `${BEAS_URL}/${data.id}`,
      method: "DELETE",
    });
  }
}
export default API;